//
//  ProtocolView.swift
//  HR
//
//  Created by zhenyu on 17/6/27.
//  Copyright © 2017年 allblue. All rights reserved.
//

import UIKit

class ProtocolView: UIView {
  
  override init(frame: CGRect) {
    super.init(frame: frame)
    setViews()
  }
  
  required init?(coder aDecoder: NSCoder) {
    fatalError("init(coder:) has not been implemented")
  }
  
  
  func setViews() {
    let imageView = UIImageView(image: #imageLiteral(resourceName: "l_protocol")).then { (i) in
      addSubview(i)
    }.then { (i) in
      i.snp.makeConstraints({ (make) in
        make.left.equalTo(self)
        make.centerY.equalTo(self)
      })
    }
    
    _ = UILabel().then { (l) in
      addSubview(l)
      l.text = "我已阅读并同意《用户协议》"
      l.font = HRFont(size: 14)
      l.textColor = Color.font
      l.attrbuteText(text: "用户协议", color: Color.theme)
    }.then { (l) in
      l.snp.makeConstraints({ (make) in
        make.centerY.equalTo(imageView)
        make.left.equalTo(imageView.snp.right)
      })
    }
  }
}
